Skip to content
This repository has been archived by the owner on Feb 17, 2021. It is now read-only.

Fix bug where a parent LK node purges child LK node's subviews #226

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

CameronAskew
Copy link

Description of the problem:

If you have a LayoutKit root node ("A") and somewhere in its subview hierarchy is another LayoutKit root node ("B"), and you call makeViews from A then it will traverse its entire subview hierarchy, including B's hierarchy, and remove views from B's hierarchy in ViewRecycler:purgeViews at:

for view in unidentifiedViews where view.isLayoutKitView {
    view.removeFromSuperview()
}

All other forms of layout allow for alternative layout strategies to be used freely at different places in the hierarchy without being intrusive like this. LayoutKit should resolve this internally.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant